jQuery(function(){
    // initialize of labels
    $('.teams .team1').fadeIn(100).effect('bounce', { times:3 }, 500, function() {
        $('.teams .team2').fadeIn(100).effect('bounce', { times:3 }, 500, function() {
            $('.teams .team3').fadeIn(100).effect('bounce', { times:3 }, 500, function() {
                $('.teams .team4').fadeIn(100).effect('bounce', { times:3 }, 500, function() {
                    $('.teams .team5').fadeIn(100).effect('bounce', { times:3 }, 500, function() {
                        $('.teams .team6').fadeIn(100).effect('bounce', { times:3 }, 500);
                    });
                });
            });
        });
    });

    // description close
    $('.description .close').click(function() {
        $(this).parent().fadeOut(500);
        return false;
    });

    // display description on click by labels
    $('.labels a').click(function() {
        $('.description p').html( $(this).find('p').html() ).parent().fadeIn(500);
        return false;
    });

    // close dialog on click outside
    $('.container').click(function() {
        $('.description').fadeOut(500);
    });
});

// 登录时密码显示与隐藏

function switchPwd() {
    var passwordeye = $('#passwordeye');
    var showPwd = $("#password");
    passwordeye.off('click').on('click',function(){
        if(passwordeye.hasClass('hide_pwd')){
            passwordeye.removeClass('hide_pwd').addClass('show_pwd');//密码可见
            showPwd.prop('type','text');
        }else{
            passwordeye.removeClass('show_pwd').addClass('hide_pwd');//密码不可见
            showPwd.prop('type','password');
        };
    });
}
switchPwd();
